package com.axxc.jpa.pattendegign.commons;

import com.axxc.jpa.pattendegign.prototype.Shoes;

/**
 * @ClassName TestPrototypePatten
 * @Description //TODO 测试原型模式
 * @author xxc
 * @data 2018年9月4日下午9:46:18
 * @see {@link http://gitee.com/biuabiu/ }
 */
public class TestPrototypePatten {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		Shoes aaa = new Shoes("男鞋");
		try {
			Shoes bbb = (Shoes) aaa.clone();
			bbb.setName("女靴");
			aaa.show();
			bbb.show();
			System.out.println(aaa == bbb);
			System.out.println(aaa.equals(bbb));
			System.out.println(aaa.getClass() == bbb.getClass());
		} catch (CloneNotSupportedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}
}
